set $tmp=0
while $tmp<$cpu_number
  eval "tvariable $pc_c_%d",$tmp
  eval "tvariable $pc_cy_%d",$tmp
  eval "tvariable $pc_tmp_0_%d",$tmp
  set $tmp=$tmp+1
end

trace *(handle_irq+5)
  commands
    teval $pc_c_0=$pc_c_0+1
    teval $pc_tmp_0_0=$clock
  end

trace *(handle_irq+11)
  commands
    teval $pc_cy_0=$pc_cy_0+$clock-$pc_tmp_0_0
  end

define showall
  if ($argc > 0)
    set $tmp=$arg0
  end
  if ($argc == 0)
    set $tmp=0
  end
  while $tmp<$cpu_number
    printf "CPU%d\n",$tmp
    eval "p $pc_c_%d",$tmp
    eval "p $pc_cy_%d/$pc_c_%d",$tmp,$tmp
    set $tmp=$tmp+1
  end
end
